﻿@using PMKB_DAL
@model PMKB_Web.Models.LinkAddOrEditMVC
@{
    ViewBag.Title = PMKBEntities_resource.Link_AddNew;
}

<h2>@PMKBEntities_resource.Link_AddNew</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(false)
    <fieldset>
        <legend>@PMKBEntities_resource.Link_AddNew</legend>

            
        
        <div class="editor-label">
            
            @PMKBEntities_resource.Link_LinkName_Label
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.link.LinkName)
            @Html.ValidationMessageFor(model => model.link.LinkName)
        </div>

        <div class="editor-label">

            @PMKBEntities_resource.Link_LinkDescription_Label
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.link.LinkDescription)
            @Html.ValidationMessageFor(model => model.link.LinkDescription)
        </div>

        <div class="editor-label">
            @PMKBEntities_resource.Link_LinkUrl_Label
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.link.LinkUrl)
            @Html.ValidationMessageFor(model => model.link.LinkUrl)
        </div>

          <p>
        @Html.ListBoxFor(model => model.IDSelectedTags, Model.TagsMVC, new { @class = "chzn-select" })
        
        <a href="javascript:AddNewTag('@ViewData.TemplateInfo.GetFullHtmlFieldId("IDSelectedTags")')">Add New Tag</a>
        </p>
        <p>
            <input type="submit" value="Save" />
        </p>

    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", MVC.Home.Index())
</div>
